package com.yuer.tools.myfileziptools.service.impl;


import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.Scanner;
import java.util.concurrent.TimeUnit;

/**
* @ClassName ICsdnDetalCollectService
* @Description  Service实现
* @Author codeGoogler
* @Date 2021-07-11
* @Version 1.0
*/
@Slf4j
@Service
public class TestServiceImpl  {

    @Async
    public  void sayHello(){

        try {
            Thread.sleep(100000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        for (int i = 0; i < 10; i++) {


            try {
                TimeUnit.SECONDS.sleep(1);
                System.out.println("发送贡献度");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    public  String   run(){
        sayHello();
        System.out.println("1234567890-=");
        return "enable  run  way";
    }
    public static void main (String[]args) /*throws Exception*/ {

        try {
        for(int i = 1; i < 10; i ++ ){
            System.out.println("大吉大利，今晚吃鸡，第" + i + "场");

                Thread.sleep(5000);//模拟睡眠5秒钟的效果

            System.out.println("本场游戏结束！\n\n\n");
        }


        System.out.print("sadasds");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        // https://www.zhihu.com/answer/2034262582
    }
}

